<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<script language="javascript">
	var req;
	
	function init() {
		if (window.XMLHttpRequest) {
			req = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			req = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	
	//根据院系ID查询DropChangeAJAXAction，获得该院系的专业列表
	function changeDropOfMajor() {
		init();
		
		var url = "dropChangeAJAX.do?method=dropChangeOfMajor&deptId=" + escape(document.forms[0].deptId.options[document.forms[0].deptId.selectedIndex].value);
		
		req.open("get", url, true);
		req.onreadystatechange = callback;
		req.send(null);
	}
	//根据专业ID查询DropChangeAJAXAction，获得该专业的所有班级列表
	function dropChangeOfClazzList() {
		init();
		
		var url = "dropChangeAJAX.do?method=dropChangeOfClazzList&majorId=" + escape(document.forms[0].majorId.options[document.forms[0].majorId.selectedIndex].value);
		
		req.open("get", url, true);
		req.onreadystatechange = callback;
		req.send(null);
	}
	
	function callback() {
		if (4 == req.readyState) {
			if (200 == req.status) {
				eval(req.responseText);
			}
		}
	}
</script>	
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
body {
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<strong>班级管理列表页面 </strong> → <a href="clazz.do?method=add">增加班级</a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="200"></td>
        <td style="padding-right:10px;"><div align="left"></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
    <html:form action="clazz.do?" method="post">
    <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
      </tr>
    </table>
    </html:form>
      <table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c9c9c9">
      <tr>
        <td width="110" height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">班级编号</span></strong></div></td>
        <td width="104" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">班级名称</span></strong></div></td>
        <td width="133" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">所属院系</span></strong></div></td>
        <td width="133" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">所属专业</span></strong></div></td>
        <td width="104" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">管 理</span></strong></div></td>
      </tr>
      <c:if test="${!empty clazzList}">
			<c:forEach items="${clazzList}" var="clazz">
      
      <tr>
        <td align="center" bgcolor="#FFFFFF">${clazz.clazzId }</td>
        <td align="center" bgcolor="#FFFFFF">${clazz.clazzName }</td>
        <td align="center" bgcolor="#FFFFFF">${clazz.major.dept.deptName }</td>
        <td align="center" bgcolor="#FFFFFF">${clazz.major.majorName }</td>
        <td align="center" bgcolor="#FFFFFF"><a href="clazz.do?method=update&id=${clazz.id }">修改</a> <a href="clazz.do?method=delete&id=${clazz.id }">删除</a></td>
      </tr>
            </c:forEach>
	  </c:if>
      
      </table></td>
  </tr>
  <tr>
    <td height="35"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25%" height="29" nowrap="nowrap">&nbsp;</td>
        <td width="75%" valign="top" class="STYLE1">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
